<?
$this->load->helper('url');

if ($_SERVER['SERVER_NAME'] == "rybalka.com.ua"){
  redirect ('');
}

if ($_SERVER['SERVER_NAME'] == "tpk-inform.com" || $_SERVER['SERVER_NAME'] == "www.tpk-inform.com"){
$URL="http://www.tpk.ua/news/newspaper/";
header ("Location: $URL");

}


?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<meta name="verify-v1" content="KU3/ejVL14+Xd+IXJqaJWnU/qb2ZqSiAcKFvvC9SGmQ=" >
 <meta name='yandex-verification' content='6cdab0e1afbb50b5' />
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<LINK href="/css/main.css" rel="stylesheet" type="text/css" >
<LINK href="/css/store.css" rel="stylesheet" type="text/css" >
<LINK href="/css/menu.css" rel="stylesheet" type="text/css" >
<link rel="icon" href="/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"> 
<script src="/scripts/store.js" type="text/javascript"></script>
<TITLE><?=$title?></TITLE>
<meta name="google-site-verification" content="Hg1-QlYznq95yej9m7toAjM7tw3Q0jH_4BkLjYNxzdQ" />
</HEAD>


<BODY>


<?
$session=$this->session->userdata('session_id');


if($_SERVER['REQUEST_URI'] != '/store/save'){
 $query = $this->db->query("SELECT id FROM session_to_store WHERE session='$session' AND status=1");
 if($query->num_rows > 0){
  $this->simplelogin->relogin();
 }
}


?>




<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr style="margin-left:10px">
<td width="16%" bgcolor="3358a8"><a class="rollover_logo"></a></td>

<? if ($this->uri->segment(1) == "store" || $_GET['c'] == 'store'){ ?>
    <? if ($this->uri->segment(2) === FALSE && $_GET['c'] != 'store') { ?>
      <td width="11%" class="table_menu" ><a class="rollover_selected"><span class="white">Магазин</span></a></td>
    
    <?}else{?>
    <td width="16%" class="table_menu" bgcolor="#3358a8"><a href="/store/" class="rollover_selected"><span class="white"><span class="link">Магазин</span></span></a></td>
 
    <?}?>

    <?}else{?>
    <td width="16%" class="table_menu" bgcolor="#3358a8"><a href="/store/" class="rollover"><span class="white"><span class="link">Магазин</span></span></a>
    </td>
    <?}?>
    
    




<td width="16%" class="table_menu" bgcolor="#3358a8">
<a href="/magazine/" class="rollover_rm"><span class="white">
<span class="link">Журнал</span></span></a></td>

<td width="16%" class="table_menu" bgcolor="#3358a8"><a href="/forum/" class="rollover"><span class="white"><span class="link">Форум</span></span></a></td>

<td width="24%" background="/images/menu/fon.gif" class="table_menu" bgcolor="3358a8">
          
          <?if($search != "false"){?>
          
          <form method="get" action="/store/search" name="search">
          <input name="c" value="store" type="hidden">
          <input name="m" value="search" type="hidden">
          <nobr>
          <span style="padding-left: 10px;padding-right: 3px;">
          <input name="s" type="search" style="position: relative; width: 50%;font:size:0.9em;" value="Поиск" onFocus="if (value == 'Поиск') {value =''}" onBlur="if (value == '') {value='Поиск'}" value="" results="10">
          </span>
            <img src="/images/global/enter.gif" style="vertical-align:middle;cursor:pointer" onclick=forms.search.submit()>
          </nobr>
          </form>
          <?}?>


</td>
<td width="8%" background="/images/menu/fon.gif" bgcolor="#3358a8">
<div style="margin-right:10px" align="center">

          				
          				<? if($_SERVER['REQUEST_URI'] != '/store/save'){ ?>
          				  
          				   <? if($this->uri->segment(2)=='add' && $this->uri->segment(1)=='store'){ ?>
          				  <SPAN class="basket">Корзина</SPAN>
          				  <? }else{ ?>
          				  <SPAN class="basket"><a href="/store/add/" style="color: #FFFFFF;">Корзина</a></SPAN>
          				  <? } 
          				  
          				  } 
          				
                

  ?>
     


</div>
</td>
<!--
<td width="16%" background="/images/menu/fon.gif" bgcolor="#3358a8">
<div style="margin-right:20px" align="right">

       <? IF(!$this->session->userdata('logged_in')) { ?>
          <SPAN class="login"><A href="#" onclick="return ToggleLoginPanel()" style="color: #FFFFFF;"><nobr>Вход с паролем</nobr></A></SPAN>
       <? }else{
         
           $username=$this->session->userdata('id');
           $query = $this->db->query("SELECT username FROM users WHERE id='$username' LIMIT 1");
           $row = $query->row();
           
           if($query->num_rows() != 0){
           ?>
             <? if($this->uri->segment(1)== 'registration' && $this->uri->segment(2)== 'edit'){ ?> 
             <SPAN class="login" style="color: #FFFFFF;"><?=$row->username?></SPAN>
               <?}else{?>
             <SPAN class="login"><a href="/registration/edit" style="color: #FFFFFF;"><?=$row->username?></a></SPAN>
             <?}?>

        <? }} ?>



</div>
</td>
-->
</tr>
    <tr class="table_menu_bottom">
      <td height="20" background="/images/menu/fon_b.gif" class="table_menu">&nbsp;</td>
    <? if ($this->uri->segment(1) == "store"){ ?>
        <td height="20" style="background-image:url(/images/menu/fon_b_sel.gif)" class="table_menu">&nbsp;</td>
    <?}else{?>
        <td height="20" background="/images/menu/fon_b.gif">&nbsp;</td>
    <?}?>
        
        <td height="20" background="/images/menu/fon_b.gif" class="table_menu">&nbsp;</td>
        <td height="20" background="/images/menu/fon_b.gif" class="table_menu">&nbsp;</td>
        <td height="20" background="/images/menu/fon_b.gif">&nbsp;</td>
        <td height="20" background="/images/menu/fon_b.gif">&nbsp;</td>
    </tr>












